
<template>
  <div class="box">
     <van-nav-bar
      title="患者详情"
      @click-left="$router.back(-1)">
      <template #left>
        <img class="icon_right" src="@/assets/img/down_left.png" alt="">
      </template>
    </van-nav-bar>
    <div class="info">
        <van-cell title="姓名" :value="$route.query.nickname" />
        <van-cell title="癌种" :value="$route.query.carcinoma" />
        <van-cell title="年龄" :value="$route.query.age" />
        <van-cell title="性别" :value="$route.query.gender == '0' ? '女':'男'" />
        <van-cell title="体重（kg)" :value="$route.query.weight" />
        <van-cell title="身高（cm)" :value="$route.query.height" />
        <van-cell title="手机号" :value="$route.query.mobile" />
        <van-cell title="体重指数（BMI)" :value="BMI" />

    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
    }
  },
  computed: {
    BMI () {
      return (this.$route.query.weight / Math.pow(parseInt(this.$route.query.height) / 100, 2)).toFixed(2)
    }
  },
  mounted () {
  }
}
</script>
<style scoped lang='less'>
.icon_right{
  width: 12px;
  height: 21px;
  vertical-align: middle;
}
.box{
   width: 100%;
   height: 100%;

   background: #F7F8FA;
   .info{
     width: 100%;
     margin-top: 40px;
     padding: 15px 17px;
     box-sizing: border-box;
     border-radius: 8px;
     /deep/.van-cell__title{
       font-weight: 600;
     }
   }
}
</style>
